#ifndef ANIMAL_H
#define ANIMAL_H
#include "lw_include.h"

#define ANIMAL_KLASS(_object_)	((animal_klass_info*)_object_)
#define ANIMAL(_object_)	((animal*)(_object_))

typedef struct _animal_klass_info animal_klass_info;
extern animal_klass_info* animal_klass;

typedef struct _animal animal;
struct _animal
{
/*class info*/
	klass_info* klass;
	
/*private data*/
	char name[256];
	int weight;
};

struct _animal_klass_info
{
/*Base*/
	klass_info base;

	char* (*move)(animal* self);
};

void animal_init(void);

char* animal_get_name(animal* self);
void animal_set_name(animal* self, char* name);
int animal_get_weight(animal* self);
void animal_set_weight(animal* self, int weight);
char* animal_move(animal* self);
#endif
